import { S } from '../../s';
import { IPSControl } from '../ipscontrol';
import { IPSSysPanelControl } from './ipssys-panel-control';
import { PSSysPanelItemImpl } from './pssys-panel-item-impl';

export class PSSysPanelControlImpl
  extends PSSysPanelItemImpl
  implements IPSSysPanelControl
{
  protected pscontrol: IPSControl;
  getPSControl(): IPSControl | null {
    return (
      this.pscontrol ||
      (this.pscontrol = this.fillObjectModel(
        S._214,
        this.M.getPSControl,
        S._2bf,
      ) as IPSControl)
    );
  }

  get viewFieldName(): string {
    return this.M.viewFieldName;
  }
  get cls(): string {
    return 'PSSysPanelControlImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._182 || cls == S._183) return true;
    return super.instanceof(cls);
  }
}
